package com.fyh.feign.fallback;

import com.fyh.constant.MessageConstant;
import com.fyh.entity.chat.SimpleContact;
import com.fyh.entity.common.Result;
import com.fyh.feign.ChatUserFeignClient;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class ChatUserFeignClientFallback implements ChatUserFeignClient {
    @Override
    public Result<List<SimpleContact>> getContactListAvatarPath(List<SimpleContact> simpleContactList) {
        System.out.println(MessageConstant.GET_SIMPLE_CONTACT_LIST_FAILED);
        throw new RuntimeException(MessageConstant.GET_SIMPLE_CONTACT_LIST_FAILED);
    }

    @Override
    public Result<String> getNickname(Long userId) {
        System.out.println(MessageConstant.GET_NAME_FAILED);
        throw new RuntimeException(MessageConstant.GET_NAME_FAILED);
    }
}
